import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import login from '@/views/login/login'
import index from '@/views/index'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },
    {
      path:'/index',
      name:'/index',
      component:index,
      //只能用这两个参数传值
      params: 'data', //传值-地址栏不可见,而且页面刷新后会丢失
      query: 'data' //传值-地址栏可见，页面刷新后不丢失
    }
  ]
})
